package com.hzncc.flowable_diboot.payment.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import com.hzncc.flowable_diboot.payment.entity.PaymentContract;
import com.hzncc.flowable_diboot.payment.entity.PaymentRegister;
import com.hzncc.flowable_diboot.payment.entity.SapPaymentContract;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

/**
* 合同收款 VO定义
* @author MyName
* @version 1.0
* @date 2024-10-30
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class PaymentContractListVO extends PaymentContract {
private static final long serialVersionUID = 1808889282725400846L;

    /**
    * 成本中心 关联字典选项
    */
    @BindDict(type = "costCenter", field = "costCenter")
    private LabelValue costCenterLabel;

    /**
    * 销售区域 关联字典选项
    */
    @BindDict(type = "salesArea", field = "salesArea")
    private LabelValue salesAreaLabel;

    /**
    * 是否外部收款 关联字典选项
    */
    @BindDict(type = "yesNo", field = "externalReceived")
    private LabelValue externalReceivedLabel;

    /**
     * 合同收款类别 关联字典选项
     */
    @BindDict(type = "paymentContractCategory", field = "paymentContractCategory")
    private LabelValue paymentContractCategoryLabel;

    /**
    * 创建人 关联信息
     *
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by = id")
    private String createByLabel;

    /**
    * 更新人 关联信息
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by = id")
    private String updateByLabel;

    /**
     * Sap客户名称
     */
    @BindField(entity = SapCustomer.class,field = "name",condition = "this.sap_customer = id")
    private String sapCustomerName;

    /**
     * 合同收款状态
     */
    @BindDict(type = "paymentContractStatus",field = "processState")
    private String processStateLabel;

    /**
     * 回款登记信息
     */
    @BindEntity(entity = PaymentRegister.class, condition = "this.payment_register_id = id",deepBind = true)
    private PaymentRegisterListVO paymentRegister;

    @BindField(entity = IamUser.class, field = "realname", condition = "this.saler = id")
    private String salerLabel;
}